<!DOCTYPE html>
<html lang="en">
	<head>
		<meta charset="utf-8" />
		<base href="../../" />
		<script src="list.js"></script>
		<script src="page.js"></script>
		<link type="text/css" rel="stylesheet" href="page.css" />
	</head>
	<body>
		<h1>[name]</h1>

		<div class="desc">A sphere defined by a center and radius.</div>

		<h2>Constructor</h2>
		<h3>[name]( [page:Vector3 center], [page:Float radius] )</h3>
		<div>
		[page:Vector3 center] - center of the sphere. Default is a [page:Vector3] at (0, 0, 0). <br />
		[page:Float radius] - radius of the sphere. Default is 0.<br /><br />

		Creates a new [name].

		</div>


		<h2>Properties</h2>


		<h3>[property:Vector3 center]</h3>
		<div>A [page:Vector3] defining the center of the sphere. Default is (0, 0, 0).</div>

		<h3>[property:Float radius]</h3>
		<div>The radius of the sphere. Default is 0.</div>

		<h2>Methods</h2>

		<h3>[method:Sphere applyMatrix4]( [page:Matrix4 matrix] )</h3>
		<div>
			[page:Matrix4 matrix] - the [Page:Matrix4] to apply <br /><br />

			Transforms this sphere with the provided [page:Matrix4].
		</div>

		<h3>[method:Vector3 clampPoint]( [page:Vector3 point], [page:Vector3 optionalTarget] )</h3>
		<div>
		[page:Vector3 point] - [page:Vector3] The point to clamp.<br />
		[page:Vector3 optionalTarget] - (optional) if specified, the result will be copied into this [page:Vector3],
		otherwise a new [page:Vector3] will be created.<br /><br />

		Clamps a point within the sphere. If the point is is outside the sphere, it will clamp it to the
		closets point on the edge of the sphere. Points already inside the sphere will not be affected.
		</div>

		<h3>[method:Sphere clone]()</h3>
		<div>Returns a new sphere with the same [page:.center center] and [page:.radius radius] as this one.</div>

		<h3>[method:Boolean containsPoint]( [page:Vector3 point] )</h3>
		<div>
		[page:Vector3 point] - the [page:Vector3] to be checked<br /><br />

		Checks to see if the sphere contains the provided [page:Vector3 point] inclusive of the
		surface of the sphere.
		</div>

		<h3>[method:Sphere copy]( [page:Sphere sphere] )</h3>
		<div>
		Copies the values of the passed sphere's [page:.center center] and [page:.radius radius]
		properties to this sphere.
		</div>

		<h3>[method:Float distanceToPoint]( [page:Vector3 point] )</h3>
		<div>
		Returns the closest distance from the boundary of the sphere to the [page:Vector3 point]. If the sphere contains the point,
		the distance will be negative.
		</div>

		<h3>[method:Boolean empty]()</h3>
		<div>Checks to see if the sphere is empty (the radius set to 0).</div>

		<h3>[method:Boolean equals]( [page:Sphere sphere] )</h3>
		<div>
		Checks to see if the two spheres' centers and radii are equal.
		</div>

		<h3>[method:Box3 getBoundingBox]( [page:Box3 optionalTarget] )</h3>
		<div>
			[page:Box3 optionalTarget] - (optional) if specified, the result will be copied into this [page:Vector3], otherwise a new [page:Box3] will be created.<br /><br />

			Returns a[link:https://en.wikipedia.org/wiki/Minimum_bounding_box Minimum Bounding Box] for the sphere.
		</div>

		<h3>[method:Boolean intersectsBox]( [page:Box3 box] )</h3>
		<div>
		[page:Box3 box] - [page:Box3] to check for intersection against.<br /><br />

		Determines whether or not this sphere intersects a given [page:Box3 box].
		</div>

		<h3>[method:Boolean intersectsPlane]( [page:Plane plane] )</h3>
		<div>
		[page:Plane plane] - Plane to check for intersection against.<br /><br />

		Determines whether or not this sphere intersects a given [page:Plane plane].
		</div>

		<h3>[method:Boolean intersectsSphere]( [page:Sphere sphere] )</h3>
		<div>
		[page:Sphere sphere] - Sphere to check for intersection against.<br /><br />

		Checks to see if two spheres intersect.
		</div>

		<h3>[method:Sphere set]( [page:Vector3 center], [page:Float radius] )</h3>
		<div>
			[page:Vector3 center] - center of the sphere.<br />
			[page:Float radius] - radius of the sphere.<br /><br />

		Sets the [page:.center center] and [page:.radius radius] properties of this sphere.
		</div>

		<h3>[method:Sphere setFromPoints]( [page:Array points], [page:Vector3 optionalCenter] )</h3>
		<div>
		[page:Array points] - an [page:Array] of [page:Vector3] positions.<br />
		[page:Vector3 optionalCenter] - Optional [page:Vector3] position for the sphere's center.<br /><br />

		Computes the minimum bounding sphere for an array of [page:Array points]. If  [page:Vector3 optionalCenter]is given,
		it is used as the sphere's center. Otherwise, the center of the axis-aligned bounding box encompassing
		[page:Array points] is calculated.
		</div>

		<h3>[method:Sphere translate]( [page:Vector3 offset] )</h3>
		Translate the sphere's center by the provided offset [page:Vector3].
		</div>

		<h2>Source</h2>

		[link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
	</body>
</html>
